<?php

namespace apiend\modules\system\models;

use Yii;
use common\models\map\MapFence;

/**
 * WEBLINK链接查询
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class MapLinkSearch extends MapFence {

    public function fields() {
        if (!empty($this->children)) {
            return [
                'id',
                'name',
                'title',
                'description',
                'thumb',
                'children',
            ];
        }
        return [
            'id',
            'name',
            'title',
            'description',
            'thumb',
            'map_id',
            'map_data' => 'mapData',
        ];
    }

}
